package com.meilai.project.service.business.workbench;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.meilai.project.dto.business.workbench.SplitAnnualTargetDTO;
import com.meilai.project.entity.business.workbench.SaleYearTarget;
import com.meilai.project.vo.business.workbench.SaleYearTargetSummaryVO;
import com.meilai.project.vo.business.workbench.YearTargetDetailVO;
import com.meilai.project.vo.business.workbench.YearTargetVO;

import java.math.BigDecimal;

/**
 * <p>
 * 销售年度目标记录表 服务类
 * </p>
 *
 * @author haiYangXu
 * @since 2022-08-16
 */
public interface SaleYearTargetService extends IService<SaleYearTarget> {

    /**
     * 添加年度目标
     *
     * @param dto
     * @return
     */
    Boolean add(SplitAnnualTargetDTO dto);

    /**
     * 新员工添加目标
     *
     * @param dto
     * @return
     */
    Boolean replenish(SplitAnnualTargetDTO dto);

    /**
     * 分页列表
     *
     * @param current_page
     * @param page_size
     * @param year
     * @return
     */
    Page<YearTargetVO> selectPage(Integer current_page, Integer page_size, Integer year);

    YearTargetDetailVO detail(Long year_id);

    SaleYearTargetSummaryVO querySaleYearTargetSummary(Integer year, Integer type, Long user_id);

    Boolean calibration(Integer year, Integer type, Long user_id, BigDecimal complete_amount);

    /**
     * 查询整年的目标数据
     * @param year
     * @param user_id
     * @return
     */
    SaleYearTargetSummaryVO querySaleAllYearTargetSummary(Integer year, Long user_id);
}
